package com.example.demo.design.demo09_prototype;

import java.util.ArrayList;

/**
 * 简历类
 * Created by 蔡超 on 2018/10/2.
 */
public class Resume implements Cloneable {

    private String name;
    private Integer age;
    private String sex;
    private ArrayList<String> familyList;//家庭成员
    private WorkExperience workExperience;//工作经验

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public ArrayList<String> getFamilyList() {
        return familyList;
    }

    public void setFamilyList(ArrayList<String> familyList) {
        this.familyList = familyList;
    }

    public WorkExperience getWorkExperience() {
        return workExperience;
    }

    public void setWorkExperience(WorkExperience workExperience) {
        this.workExperience = workExperience;
    }

    /*
    * 重写克隆方法，如果调用父类是浅克隆，深克隆要自己写
    * */
    @Override
    public Resume clone() throws CloneNotSupportedException {
        return (Resume) super.clone();
    }

    @Override
    public String toString() {
        return "Resume{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", familyList=" + familyList +
                ", workExperience=" + workExperience +
                '}';
    }
}
